/*    */ package com.zimbra.cs.filter.jsieve;
/*    */ 
/*    */ import com.google.common.collect.Sets;
/*    */ import com.zimbra.cs.filter.ZimbraMailAdapter;
/*    */ import java.util.HashSet;
/*    */ import java.util.List;
/*    */ import java.util.Set;
/*    */ import org.apache.jsieve.mail.MailAdapter;
/*    */ import org.apache.jsieve.tests.AbstractTest;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public abstract class CommunityAbstractTest
/*    */   extends AbstractTest
/*    */ {
/*    */   protected static final String notificationTypeHeaderName = "X-Zimbra-Community-Notification-Type";
/* 33 */   protected static final HashSet<String> requestNotifications = Sets.newHashSet(new String[] { "bb196c30-fad3-4ad8-a644-2a0187fc5617", "3772ef23-6aa0-4a22-9e88-a4313c37ebe6", "1b0500d2-c789-421e-a25b-3ab823af53be" });
/*    */   
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/* 39 */   protected static final HashSet<String> contentNotifications = Sets.newHashSet(new String[] { "6a3659db-dec2-477f-981c-ada53603ccbb", "94dc0d37-3a65-43de-915d-d7d62774b576", "d0e2bf58-74b3-4090-8ff0-0d9a11188f0b", "95a4065f-1177-4dca-b8d5-a27d4d0d7b63", "5c976a15-64a5-4974-a5d6-a247163f2e01", "5898644c-b6a0-4d82-a4c6-6e5a8940884c", "4876d7ce-b48c-4a08-8cd9-872342c5bdf8", "82e1d0b4-854e-43c9-85d7-dea7d4dec949", "8e627c29-8602-4110-877d-0232e4ea2fd5", "be997a7a-5026-435f-8ea5-4fe3d90a6ba9", "eea4ccbb-6e07-4a6d-9bb6-8b02f060f79c", "352a702d-2a77-4307-9e9e-c564426e8cc8", "0e952633-fa46-448d-b1aa-bb6c60a388fb", "e3df1b21-ac81-4eb3-8ab6-69dc049f5684", "f8c93cd5-d40e-461d-b13a-b02e92bfcbbf" });
/*    */   
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/* 57 */   protected static final HashSet<String> connectionsNotifications = Sets.newHashSet(new String[] { "194d3363-f5a8-43b4-a1bd-92a95f6dd76b", "1cee0f92-3650-4110-9f0b-69b0e175914d", "16828d04-0555-4c80-88c4-da87e86698b8", "84e4c0a7-3a17-4dfe-b8a0-d7038aa04a84", "df527fff-4d37-4b8c-afbc-949b6337cdca", "328e5139-d759-405c-98da-91cd25bcc80c" });
/*    */   
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */   protected boolean checkHeaderValue(MailAdapter mail, Set<String> values)
/*    */   {
/* 67 */     if (!(mail instanceof ZimbraMailAdapter)) {
/* 68 */       return false;
/*    */     }
/* 70 */     ZimbraMailAdapter adapter = (ZimbraMailAdapter)mail;
/* 71 */     List<String> header = adapter.getHeader("X-Zimbra-Community-Notification-Type");
/* 72 */     if (!header.isEmpty()) {
/* 73 */       for (String id : header) {
/* 74 */         if (values.contains(id)) {
/* 75 */           return true;
/*    */         }
/*    */       }
/*    */     }
/* 79 */     return false;
/*    */   }
/*    */ }


/* Location:              /home/mint/zimbrastore.jar!/com/zimbra/cs/filter/jsieve/CommunityAbstractTest.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       0.7.1
 */